var entityId =beforeId;
var url = window.rootPath + '/ui/task/' + taskId;
jQuery('.app-btn-pass').on('click', function() {
	jQuery('#loadingImage').show();
	jQuery(".btn").attr("disabled", true);
	jQuery.ajax({
		url : encodeURI(url),
		method : "post",
		data : JSON.stringify({
			"auditState" : "通过",
			"auditAdvice" : jQuery('#auditAdvice').val(),
			"taskId" : taskId

		}),
		contentType : 'application/json;charset=utf-8',
		dataType : 'json',
		success : function() {
			jQuery(".btn").attr("disabled", false);
			jQuery('#loadingImage').hide();
			window.location = window.rootPath + '/ui/index';
		}
	});
});
jQuery('.app-btn-reject').on('click', function() {
	jQuery('#loadingImage').show();
	jQuery(".btn").attr("disabled", true);
	jQuery.ajax({
		url : encodeURI(url),
		method : "post",
		data : JSON.stringify({
			"auditState" : "驳回",
			"auditAdvice" : jQuery('#auditAdvice').val(),
			"taskId" : taskId
		}),
		contentType : 'application/json;charset=utf-8',
		dataType : 'json',
		success : function(data) {
			jQuery(".btn").attr("disabled", false);
			jQuery('#loadingImage').hide();
			window.location = window.rootPath + '/ui/index';
		}
	});
});
